unit uBaseFormLocate;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uBaseForm, ImgList, StdActns, ActnList, Buttons, ExtCtrls, ToolWin,
  ComCtrls, Grids, DBGrids, Menus, DataSetExport;

type
  TfBaseFormLocate = class(TfBaseForm)
    CoolBar: TCoolBar;
    paConsulta: TPanel;
    btAjuda: TSpeedButton;
    ActionList: TActionList;
    actLocate: TAction;
    actHelp: TAction;
    actListRefresh: TAction;
    actForm: TAction;
    actLocateDataset: TAction;
    actCountRecord: TAction;
    actFilter: TAction;
    actOrder: TAction;
    actOrderDesc: TAction;
    actMultiSelect: TAction;
    actMultiDelete: TAction;
    actCopySelect: TAction;
    actExportRTF: TAction;
    actExportPDF: TAction;
    actExportExcel: TAction;
    actExportXML: TAction;
    actExportHTML: TAction;
    actExportTXT: TAction;
    actPrintConfig: TFilePrintSetup;
    actPrint: TAction;
    actPrintTextMode: TAction;
    ImageListAct: TImageList;
    bOrder: TSpeedButton;
    bOrderDesc: TSpeedButton;
    bLocate: TSpeedButton;
    StatusBar: TStatusBar;
    pGridLocate: TPanel;
    DBGridLocate: TDBGrid;
    btFerramentas: TSpeedButton;
    PopupMenu: TPopupMenu;
    mniSep1: TMenuItem;
    mniLocate: TMenuItem;
    mniOrder: TMenuItem;
    mniOrderDec: TMenuItem;
    mniSep2: TMenuItem;
    mniCountRecord: TMenuItem;
    mniMultiSelect: TMenuItem;
    mniCopySelect: TMenuItem;
    Exportarseleo1: TMenuItem;
    mniExportRTF: TMenuItem;
    mniExportPDF: TMenuItem;
    mniExportExcel: TMenuItem;
    mniExportXML: TMenuItem;
    actExportHTML1: TMenuItem;
    XT1: TMenuItem;
    mniSep4: TMenuItem;
    mniPrintConfig: TMenuItem;
    mniPrint: TMenuItem;
    mniPrintTextMode: TMenuItem;
    mniFields: TMenuItem;
    actFields: TAction;
    procedure FormDestroy(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure actLocateExecute(Sender: TObject);
    procedure actOrderDescExecute(Sender: TObject);
    procedure actOrderExecute(Sender: TObject);
    procedure btFerramentasClick(Sender: TObject);
  private
    { Private declarations }
    FDataSetExport: TDataSetExport;
  public
    { Public declarations }
  end;

var
  fBaseFormLocate: TfBaseFormLocate;

implementation

{$R *.dfm}

procedure TfBaseFormLocate.actLocateExecute(Sender: TObject);
begin
  inherited;
  // Locate it DBGridLocate.SelectedField
end;

procedure TfBaseFormLocate.actOrderDescExecute(Sender: TObject);
begin
  inherited;
  // Order it DBGridLocate.SelectedField
end;

procedure TfBaseFormLocate.actOrderExecute(Sender: TObject);
begin
  inherited;
  
  // Order it DBGridLocate.SelectedField
end;

procedure TfBaseFormLocate.btFerramentasClick(Sender: TObject);
begin
  inherited;
  actCopySelect.Enabled  := actMultiSelect.Checked;
  PopupMenu.Popup(Self.Left + btFerramentas.Left + 10, Self.Top + btFerramentas.Top + (btFerramentas.Height * 2));
end;

procedure TfBaseFormLocate.FormCreate(Sender: TObject);
begin
  inherited;
  FDataSetExport := TDataSetExport.Create(Self);
end;

procedure TfBaseFormLocate.FormDestroy(Sender: TObject);
begin
  FreeAndNil(FDataSetExport);

  inherited;

end;

end.
